package cn.zwz.customer.entity;

import cn.zwz.basics.baseClass.ZwzBaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import jakarta.persistence.Entity;
import jakarta.persistence.Table;
import jakarta.persistence.Transient;
import java.math.BigDecimal;
import java.util.List;

/**
 * @author 熊英杰
 */
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@Table(name = "a_order")
@TableName("a_order")
@ApiModel(value = "订单信息")
public class Order extends ZwzBaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "订单编号")
    private String code;

    @ApiModelProperty(value = "订单状态")
    private String status;

    @ApiModelProperty(value = "订单总价")
    private BigDecimal sumMoney;

    @ApiModelProperty(value = "订单生成日期")
    private String date;

    @ApiModelProperty(value = "操作人员")
    private String userName;

    @ApiModelProperty(value = "订单客户ID")
    private String customerId;

    @ApiModelProperty(value = "订单客户姓名")
    private String customerName;

    @ApiModelProperty(value = "收货人")
    private String inName;

    @ApiModelProperty(value = "收货电话")
    private String inMobile;

    @ApiModelProperty(value = "付款人")
    private String outName;

    @ApiModelProperty(value = "付款电话")
    private String outMobile;

    @ApiModelProperty(value = "备注")
    private String remark;

    @Transient
    @TableField(exist=false)
    @ApiModelProperty(value = "条目列表")
    private List<OrderItem> itemList;
}